import request from '@/utils/request'
import defaultSettings from '@/settings'

export function list(status, deptName) {
  return request({
    url: defaultSettings.serviceUrl.moon_fast + '/dept/sysDept/list',
    method: 'get'
  })
}

export function save(data) {
  return request({
    url: defaultSettings.serviceUrl.moon_fast + '/dept/sysDept/save',
    method: 'post',
    data: data
  })
}

export function removeByIds(ids) {
  return request({
    url: defaultSettings.serviceUrl.moon_fast + '/dept/sysDept/removeByIds?ids=' + ids,
    method: 'get'
  })
}

export function getDeptTreeList() {
  return request({
    url: defaultSettings.serviceUrl.moon_fast + '/dept/sysDept/getDeptTreeList',
    method: 'get'
  })
}

export function getDeptAndPostTreeList() {
  return request({
    url: defaultSettings.serviceUrl.moon_fast + '/dept/sysDept/getDeptAndPostTreeList',
    method: 'get'
  })
}
export function cleanCache() {
  return request({
    url: defaultSettings.serviceUrl.moon_fast + '/config/sysConfig/cleanCache',
    method: 'get'
  })
}
